package com.cxyzy.demo.db.dao

import androidx.paging.DataSource
import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.Query
import com.cxyzy.demo.db.bean.User

@Dao
interface UserDao {
    @Query("SELECT * FROM User")
    fun getUserList(): DataSource.Factory<Int, User>

    @Insert
    fun add(user: User)

    @Insert
    fun add(users: List<User>)

    @Delete
    fun del(user:User)
}